/* pages/index/detail/detail.wxss */
.detail-container {
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* 导航栏 */
.nav-container {
  background-color: #ffffff;
  border-bottom: 1rpx solid #f0f0f0;
}

.nav-scroll {
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  padding: 0 30rpx;
  min-width: max-content;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20rpx 30rpx;
  font-size: 30rpx;
  color: #666666;
  position: relative;
  white-space: nowrap;
  margin-right: 20rpx;
}

.nav-item.active {
  color: #333333;
  font-weight: bold;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40rpx;
  height: 4rpx;
  background-color: #ff6b6b;
  border-radius: 2rpx;
}

.nav-item:active {
  transform: scale(0.95);
}

/* 菜谱图片区域 */
.recipe-image-section {
  position: relative;
  height: 500rpx;
  overflow: hidden;
}

.recipe-image {
  width: 100%;
  height: 100%;
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 40rpx 30rpx 30rpx;
  color: white;
}

.recipe-title {
  font-size: 36rpx;
  font-weight: bold;
  margin-bottom: 20rpx;
  line-height: 1.4;
}

.recipe-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author-info {
  display: flex;
  align-items: center;
  font-size: 28rpx;
}

.author-avatar {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  margin-right: 15rpx;
}



// 菜谱发布信息
.recipe-publish-info {
  display: flex;
  background-color: #ffffff;
  flex-direction: column;
  margin-top: 20rpx;
}

.publish-author {
  font-size: 24rpx;
  opacity: 0.8;
}
.publish-time {
  font-size: 24rpx;
  opacity: 0.8;
}
/* 菜谱信息 */
.recipe-info {
  background-color: #ffffff;
  padding: 30rpx;
  margin-bottom: 20rpx;
}

.info-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30rpx;
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-label {
  font-size: 24rpx;
  color: #999999;
  margin-bottom: 8rpx;
}

.info-value {
  font-size: 28rpx;
  font-weight: bold;
  color: #333333;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  padding-top: 20rpx;
  border-top: 1rpx solid #f0f0f0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-icon {
  font-size: 32rpx;
  margin-bottom: 8rpx;
}

.stat-text {
  font-size: 24rpx;
  color: #666666;
}

/* 操作按钮 */
.action-buttons {
  display: flex;
  background-color: #ffffff;
  padding: 20rpx 30rpx;
  margin-bottom: 20rpx;
}

.action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 20rpx 10rpx;
  margin: 0 10rpx;
  border-radius: 12rpx;
  transition: all 0.3s ease;
}

.action-btn:active {
  background-color: #f8f9fa;
  transform: scale(0.95);
}

.btn-icon {
  font-size: 32rpx;
  margin-bottom: 8rpx;
}

.btn-text {
  font-size: 24rpx;
  color: #666666;
}

.like-btn:active .btn-icon {
  transform: scale(1.2);
}

/* 菜谱描述 */
.recipe-description {
  background-color: #ffffff;
  padding: 30rpx;
  margin-bottom: 20rpx;
}

.description-text {
  font-size: 28rpx;
  line-height: 1.6;
  color: #333333;
}

/* 通用区域样式 */
.section-header {
  display: flex;
  align-items: center;
  padding: 30rpx 30rpx 20rpx;
  background-color: #ffffff;
}

.section-title {
  font-size: 32rpx;
  font-weight: bold;
  color: #333333;
}

.section-subtitle {
  font-size: 24rpx;
  color: #999999;
  margin-left: 10rpx;
}

/* 食材清单 */
.ingredients-section {
  background-color: #ffffff;
  margin-bottom: 20rpx;
}

.ingredients-list {
  padding: 0 30rpx 30rpx;
}

.ingredient-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20rpx 0;
  border-bottom: 1rpx solid #f0f0f0;
}

.ingredient-item:last-child {
  border-bottom: none;
}

.ingredient-name {
  font-size: 28rpx;
  color: #333333;
}

.ingredient-amount {
  font-size: 26rpx;
  color: #666666;
}

/* 制作步骤 */
.steps-section {
  background-color: #ffffff;
  margin-bottom: 20rpx;
}

.steps-list {
  padding: 0 30rpx 30rpx;
}

.step-item {
  display: flex;
  margin-bottom: 40rpx;
}

.step-item:last-child {
  margin-bottom: 0;
}

.step-number {
  width: 60rpx;
  height: 60rpx;
  background-color: #667eea;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24rpx;
  font-weight: bold;
  margin-right: 20rpx;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-image {
  width: 100%;
  height: 300rpx;
  border-radius: 12rpx;
  margin-bottom: 20rpx;
}

.step-text {
  font-size: 28rpx;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 15rpx;
}

.step-tip {
  background-color: #f8f9fa;
  padding: 20rpx;
  border-radius: 8rpx;
  border-left: 4rpx solid #667eea;
}

.tip-label {
  font-size: 24rpx;
  color: #667eea;
  font-weight: bold;
}

.tip-text {
  font-size: 24rpx;
  color: #666666;
  margin-left: 8rpx;
}

/* 营养信息 */
.nutrition-section {
  background-color: #ffffff;
  margin-bottom: 20rpx;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20rpx;
  padding: 0 30rpx 30rpx;
}

.nutrition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20rpx;
  background-color: #f8f9fa;
  border-radius: 8rpx;
}

.nutrition-label {
  font-size: 26rpx;
  color: #333333;
}

.nutrition-value {
  font-size: 26rpx;
  color: #667eea;
  font-weight: bold;
}

/* 相关推荐 */
.related-section {
  background-color: #ffffff;
  margin-bottom: 20rpx;
}

.related-scroll {
  white-space: nowrap;
}

.related-list {
  display: flex;
  padding: 0 30rpx 30rpx;
}

.related-item {
  width: 200rpx;
  margin-right: 20rpx;
  flex-shrink: 0;
}

.related-image {
  width: 100%;
  height: 150rpx;
  border-radius: 8rpx;
  margin-bottom: 10rpx;
}

.related-title {
  font-size: 24rpx;
  color: #333333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
